home *** CD-ROM | disk | FTP | other *** search
/ Champak 135 / Vol 135.iso / games / bunny_gr.swf / scripts / frame_77 / DoAction.as
Text File  |  2008-11-12  |  651b  |  24 lines

  1. if(random("25") < "2" or drinks_active == "0")
  2. {
  3.    random_hole = random(MAX_HOLES) + "1";
  4.    if(lives < MAX_LIVES and life_active == "0" and random("4") == "0")
  5.    {
  6.       random_drink = random(MAX_DRINKS) + "1";
  7.       if(random_drink == LIFE_DRINK)
  8.       {
  9.          life_active = "1";
  10.       }
  11.    }
  12.    else
  13.    {
  14.       random_drink = random(MAX_DRINKS - "1") + "1";
  15.    }
  16.    if(eval("hole" add random_hole) == "0")
  17.    {
  18.       set("hole" add random_hole,"1");
  19.       set("/hole" add random_hole add ":start_time",getTimer());
  20.       set("/hole" add random_hole add ":current_drink",random_drink);
  21.       drinks_active += "1";
  22.    }
  23. }
  24.